package com.atguigu.lease.common.exception;

import com.atguigu.lease.common.result.ResultCodeEnum;
import lombok.Data;

import java.io.Serializable;

/**
 * @ClassName MyBusinessException
 * @Author heartFade
 * @Date 2025-04-26 21:04
 * @Version 1.0
 * @Description TODO
 **/
@Data
public class MyBusinessException extends RuntimeException implements Serializable {
    private Integer code;
    private String message;

    public MyBusinessException()
    {

    }
    public MyBusinessException(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
    public MyBusinessException(ResultCodeEnum resultCodeEnum)
    {
        this.code=resultCodeEnum.getCode();
        this.message=resultCodeEnum.getMessage();
    }
}
